import { NgModule,SkipSelf,Optional } from '@angular/core';
import { CommonModule } from '@angular/common';
import { CoreModule } from '../core/core.module';
import { RouterModule }   from '@angular/router';
import { FormsModule }   from '@angular/forms';
import { DropdownModule } from 'primeng/primeng';
import { MatButtonModule,MatInputModule } from '@angular/material';
import { DragulaModule } from 'ng2-dragula';
import { PublicModule } from '../public/public.module';
import { BsDatepickerModule } from 'ngx-bootstrap';
import { Ng2SmartTableModule } from 'ng2-smart-table';
import { ContentComponent } from './content.component';
import { ContentProductComponent } from './product/content-product.component';
import { ContentProductTableComponent } from './product/table/content-product-table.component';
import { ContentProductAddComponent } from './product/add/content-product-add.component';
import { ContentProductEditComponent } from './product/edit/content-product-edit.component';
import { ContentProductDeleteComponent } from './product/delete/content-product-delete.component';
import { ContentProductDetailsComponent } from './product/details/content-product-details.component';
import { ContentProductAddAuthorComponent } from './product/add/content-product-add-author.component';
import { ContentProductEditAuthorComponent } from './product/edit/content-product-edit-author.component';
import { ContentInnertextComponent } from './innertext/content-innertext.component';
import { ContentInnertextTableComponent } from './innertext/table/content-innertext-table.component';
import { ProductTypeTreeComponent } from '../system/product-type/product-type-tree/product-type-tree.component';
import { SystemModule } from '../system/system.module';
import {ProductContentProjectComponent} from './product/project/product-content-project.component';

@NgModule({
  imports: [
    CommonModule,
    CoreModule,
    RouterModule,
    FormsModule,
    DragulaModule,
    DropdownModule,
    MatButtonModule,
    MatInputModule,
    PublicModule,
    Ng2SmartTableModule,
    SystemModule,
    BsDatepickerModule.forRoot()
  ],
  declarations: [
    ContentComponent,
    ContentProductComponent,
    ContentProductTableComponent,
    ContentProductAddComponent,
    ContentProductEditComponent,
    ContentProductDeleteComponent,
    ContentProductDetailsComponent,
    ContentProductAddAuthorComponent,
    ContentProductEditAuthorComponent,
    ContentInnertextComponent,
    ContentInnertextTableComponent,
    ProductContentProjectComponent
  ]
})
export class ContentModule {
  constructor(@Optional() @SkipSelf() parent:ContentModule){
    if(parent){
      throw new Error('Synonym模块已经加载，不要再次加载')
    }
  }
 }
